package com.bclz.service.impl;


import org.springframework.stereotype.Service;

import com.bclz.bo.CommentBo;
import com.bclz.common.AbstracePage;
import com.bclz.common.base.AbstractBaseService;
import com.bclz.entity.Comment;
import com.bclz.mapper.CommentMapper;
import com.bclz.service.CommentService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

@Service
public class CommentServiceImpl extends AbstractBaseService<Comment, CommentMapper>  implements CommentService {

	@Override
	public PageInfo<CommentBo> listbyPostId(String postId,AbstracePage page) {
		// TODO Auto-generated method stub
		Page<CommentBo> pageres=PageHelper.startPage(page.getPageNum(),page.getPageSize() , true);
		mapper.listbyPostId(postId);
		PageInfo<CommentBo> info=new PageInfo<CommentBo>(pageres);
		return info;
	}


}
